from selenium.webdriver.support.wait import WebDriverWait


class GetElement():

    def getElement(self,driver,by,value):
        wdt = WebDriverWait(driver,10,1)
        try:
            l = wdt.until(lambda l: l.find_element(by, value))
        except Exception as e:
            return e
        else:
            return l